package org.langqiao.genericity;

import java.util.ArrayList;
import java.util.List;

/**
 * 
 *	java泛型
 * @author YMY
 */
public class Generic {
	
	public static List<? extends Object> list =null;
	
	public static void main(String[] args){
		list = new ArrayList<Object>();
		int a = 1;
		double b = 2.0D;
		String c ="nihao";
		list.add(1, null);
		
	}
	
	public void listAdd(){
		List<Object> list1 = new ArrayList<Object>();
		int a = 1;
		double b = 2.0D;
		String c ="nihao";
		list1.add(a);
		list1.add(b);
		list1.add(c);
	}
	
	public void inspect(List<Object> list){
		for(Object obj:list){
			System.out.println(obj);
		}
		list.add(1);
	}
	public void test(){
		List<Integer> strs = new ArrayList<Integer>();
		//inspect(strs);
	}
}
